//
//  SizeClassesTestController.m
//  TestDemo
//
//  Created by fengxijun on 2/25/16.
//  Copyright © 2016 goappbox. All rights reserved.
//

#import "SizeClassesTestController.h"
#import "FSLoadingView.h"

@implementation SizeClassesTestController
{
    FSLoadingView *loadingView;
    NSTimer *timer;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.imageView1.image = [UIImage imageNamed:@"touxiang1"];
    self.imageView2.image = [UIImage imageNamed:@"bianjitupian"];
    loadingView = [[FSLoadingView alloc] initWithFrame:CGRectMake(30.f, 200.f, 100.f, 100.f)];
    [self.view addSubview:loadingView];
//    [loadingView setPercent:100 animated:YES];
    timer = [NSTimer scheduledTimerWithTimeInterval:.1f target:self selector:@selector(testTimer:) userInfo:nil repeats:YES];
}

- (void)testTimer:(NSTimer *)tm
{
    static NSInteger precent = 0;
    if (precent >= 100) {
        precent = 0;
    }
    [loadingView setPercent:precent animated:YES];
    precent++;
}

@end
